{% extends '::base.html.twig' %}

      
        {% block link %}
        <!-- bootstrap 3.0.2 -->
        <link href="{{asset('bundles/cursomain/css/bootstrap.min.css')}}" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="{{asset('bundles/cursomain/css/font-awesome.min.css')}}" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="{{asset('bundles/cursomain/css/ionicons.min.css')}}" rel="stylesheet" type="text/css" />
        <!-- DATA TABLES -->
        <link href="{{asset('bundles/cursomain/css/datatables/dataTables.bootstrap.css')}}" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="{{asset('bundles/cursomain/css/AdminLTE.css')}}" rel="stylesheet" type="text/css" />
	   {% endblock %}
	   
	   {% block header %}
    <header class="header">
            <a href="{{path('curso_main_regist')}}" class="logo">
                <!-- Add the class icon to your logo image or logo icon to add the margining -->
                Sistema de Reclamos
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                <div class="navbar-right">
                 {% block userAccount %}
                    <ul class="nav navbar-nav">
                        <!-- Seccion que mostra la cuenta de usuario y validar que se despliegue -->
                      
                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="glyphicon glyphicon-user"></i>
                                <span> {% if nombreUsuario is defined %}
                                		{{ nombreUsuario }}
                                <i class="caret"></i></span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- User image -->
                                <li class="user-header bg-light-blue">
                                    <img src="{{asset('bundles/cursomain/images/img/avatar.png')}}" class="img-circle" alt="User Image" />
                                    <p>
                                        <small> </small>
                                    </p>
                                </li>
                                <!-- Menu Body -->
                                
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="{{path('curso_main_regist')}}" class="btn btn-default btn-flat">Inicio</a>
                                    </div>
                                    <div class="pull-right">
                                        <a href="{{path('curso_main_logout')}}" class="btn btn-default btn-flat">Salir</a>
                                    </div>
                                </li>
                            </ul>
                             {% else %}
                             No se autentificado
                             </a>
                             {% endif %}
                        </li>
                    </ul>
                  {% endblock %}
                </div>
            </nav>
        </header>
        {% endblock %}
	   
	   
	   {% block sliderMenu %}
                    <ul class="sidebar-menu">
                        <li class="treeview">
                            <a href="#">
                                <i class="fa fa-bar-chart-o"></i>
                                <span>Denuncia</span>
                                <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu">
                                <li><a href="{{ path('curso_main_nuevaDenuncia') }}"><i class="fa fa-angle-double-right"></i>Nueva Denuncia</a></li>
                                <li><a href="{{ path('curso_main_adminDenunciasRegist') }}"><i class="fa fa-angle-double-right"></i>Consultar estado</a></li>
                       
                            </ul>
                        </li>                     
                      </ul>
                     {% endblock %}

		{% block title %}
 			Sistema de Reclamos
		{% endblock %}

			{% block body %}
                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-xs-12">
                            
                            <div class="box">
                                <div class="box-header">
                                    <h3 class="box-title">Solicitudes Enviadas</h3>                                    
                                </div><!-- /.box-header -->
                                <div class="box-body table-responsive">
                                    <table id="example1" class="table table-bordered table-striped">
                                        <thead>
                                            <tr>
                                                <th>Id Solicitud</th>
                                                <th>Descripcion</th>
                                                <th>Nombre Empresa</th>
                                                <th>Tipo Empresa</th>
                                                <th>Estado</th>
                                                <th>Cancelar</th>
                                                <th>Reporte</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        {% for dato in datos %}
										   {% if dato.idUsuario == person %}
                                           <tr>
                                                <td>{{ dato.idSolicitud }}</td>
                                                <td>{{ dato.descripcion }}</td>
                                                <td>{{ dato.nombreEmpresa }}</td>
                                                <td>{{ dato.nombreTipoEmpresa }}</td>
                                                <td>{{ dato.estadoSolicitud }}</td>
                                                <td>
                                                {% if dato.estadoSolicitud == 'Enviado' %}
                                                <a href="{{ path('curso_main_eliminarSolicitud', { 'idSolicitud': dato.idSolicitud }) }}">Cancelar</a>
                                                {% else %}
                                                No Disponible
                                                {% endif %}
                                                </td>
                                                <td>
                                                <a href="{{ path('curso_main_reporteSolicitud', { 'idSolicitud': dato.idSolicitud }) }}">Ver Reporte</a> 
                                                </td>
                                            </tr>
                                           {% endif %}
                                         {%  endfor %}
                                        </tbody>
                                        <!-- 
                                        <tfoot>
                                            <tr>
                                                <th>Id Solicitud</th>
                                                <th>Descripcion</th>
                                                <th>Nombre Empresa</th>
                                                <th>Tipo Empresa</th>
                                                <th>Estado</th>
                                                
                                            </tr>
                                        </tfoot>  -->
                                    </table>
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
                        </div>
                    </div>
			{% endblock %}
			{% block script %}
        <!-- jQuery 2.0.2 -->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="{{asset('bundles/cursomain/js/bootstrap.min.js')}}" type="text/javascript"></script>
        <!-- DATA TABES SCRIPT -->
        <script src="{{asset('bundles/cursomain/js/plugins/datatables/jquery.dataTables.js')}}" type="text/javascript"></script>
        <script src="{{asset('bundles/cursomain/js/plugins/datatables/dataTables.bootstrap.js')}}" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="{{asset('bundles/cursomain/js/AdminLTE/app.js')}}" type="text/javascript"></script>
			{% endblock %}
			
			 {% block  scripts %}
        <!-- page script -->
        <script type="text/javascript">
            $(function() {
                $("#example1").dataTable();
                $('#example2').dataTable({
                    "bPaginate": true,
                    "bLengthChange": false,
                    "bFilter": false,
                    "bSort": true,
                    "bInfo": true,
                    "bAutoWidth": false
                });
            });
        </script>
        {% endblock %}


